package com.quanyan.comment.serviceFacade.impl;




import com.quanyan.comment.reqeust.*;
import com.quanyan.comment.response.*;
import com.quanyan.comment.service.CommentDetailService;
import com.quanyan.comment.service.CommentService;
import com.quanyan.api.APIResponse;


import com.quanyan.comment.service.CommentSumService;
import com.quanyan.comment.service.CommentTagService;
import com.quanyan.comment.serviceFacade.CommentServiceFacade;
import com.quanyan.common.Plugin.PageObj;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by jian.zhou on 2016/6/2.
 * 评论接口实现
 */
@Service("commentServiceFacade")
public class CommentServiceFacadeImpl  implements CommentServiceFacade {

    @Autowired
    private CommentService commentService;

    @Autowired
    private CommentSumService commentSumService;

    @Autowired
    private CommentTagService commentTagService;

    @Autowired
    private CommentDetailService commentDetailService;

    @Override
    public APIResponse commentAdd(ReqCommentParam reqCommentParam) {
        return commentService.commentAdd(reqCommentParam);
    }

    @Override
    public APIResponse<PageObj<List<RespComment>>> commentQuery(ReqCommentQuery reqCommentQuery) {
        return commentService.commentQuery(reqCommentQuery);
    }

    @Override
    public APIResponse commentDel(Integer commentId) {
        return commentService.commentDel(commentId);
    }

    @Override
    public APIResponse<List<RespCommentDetail>> getCommentDetailPro(String businessCode,Integer businessId) {
        return commentDetailService.getCommentDetailPro(businessCode,businessId);
    }

    @Override
    public APIResponse<List<RespCommentDetailScore>> getCommentDetailScore(Integer commentId) {
        return commentDetailService.getCommentDetailScore(commentId);
    }

    @Override
    public APIResponse<Boolean> checkIsComment(ReqIsComment reqIsComment) {
        return commentService.checkIsComment(reqIsComment);
    }

    @Override
    public RespCommentSum queryCommentSum(ReqBaseParam reqBaseParam) {
        return commentSumService.queryCommentSum(reqBaseParam);
    }

    @Override
    public boolean checkIsCommentPlace(ReqIsComment reqIsComment) {
        return commentService.checkIsCommentPlace(reqIsComment);
    }

    @Override
    public APIResponse<List<RespCommentSum>> batchQueryClubCommentSum(ReqBaseParam reqBaseParam) {
        return commentSumService.batchQueryClubCommentSum(reqBaseParam);
    }


    @Override
    public APIResponse<List<RespCommentTag>> commentTagQuery(ReqCommentQuery reqCommentQuery) {
        return commentTagService.commentTagQuery(reqCommentQuery);
    }

    @Override
    public APIResponse commentTagInsert(ReqCommentTag reqCommentTag) {
        return commentTagService.commentTagInsert(reqCommentTag);
    }

    @Override
    public APIResponse commentTagUpdate(ReqCommentTag reqCommentTag) {
        return commentTagService.commentTagUpdate(reqCommentTag);
    }

    @Override
    public RespCommentTagAndCommentDetail getCommentTagAndCommentDetail(ReqCommentQuery reqCommentQuery) {
        return commentService.getCommentTagAndCommentDetail(reqCommentQuery);
    }

    @Override
    public APIResponse delDynamicComment(ReqCommentQuery reqCommentQuery) {
        return commentService.delDynamicComment(reqCommentQuery);
    }

    @Override
    public APIResponse<List<RespCommentDetailScore>> getRespCommentDetailScoreSum(ReqCommentQuery reqCommentQuery) {
        return commentDetailService.getRespCommentDetailScoreSum(reqCommentQuery);
    }

    @Override
    public boolean checkIsReplace(ReqIsComment reqIsComment) {
        return commentService.checkIsReplace(reqIsComment);
    }

    @Override
    public List<LableBaseInfo> batchTagByIds(List<Integer> ids) {
        return commentTagService.batchTagByIds(ids);
    }

    @Override
    public List<LableBaseInfo> randTags(Integer pageSize) {
        return commentTagService.randTags(pageSize);
    }
}
